Conventionally, an electronic key system establishes wireless communication between an onboard apparatus and a portable apparatus carried by a user. The electronic key system performs a predetermined operation, for example, to lock or unlock a door when an ID transmitted from the portable apparatus matches an ID that is preregistered in the onboard apparatus. In order to maintain security, an electronic key system adopts a common key cryptosystem as disclosed in Patent Literature 1. In the common key cryptosystem, the same secret key is used for both encryption and decryption.
This type of electronic key system is configured to register a portable apparatus so as to cope with an increase in the number of users by additionally registering an ID in the onboard apparatus or by changing an ID registered in the onboard apparatus. When the portable apparatus is registered, an ID for normal operations that is incorporated in the portable apparatus is also used as an ID that causes the onboard apparatus to recognize an authorized user.
The inventors of the present disclosure have found the following about an electronic key system. When an unauthorized user knows a cryptographic algorithm for the common key cryptosystem and is able to acquire an ID from a portable apparatus by using an illegal attack tool, it may be probable that the unauthorized user knows a secret key. When the unauthorized user knows the secret key, even the unauthorized user may be able to register a portable apparatus.